<?php
return array(
    'controllers' => array(
    		
        'invokables' => array(
            'TestModule\Controller\Index' => 'TestModule\Controller\IndexController',
        	
        ),
    ),
		
	'router' => array(
			'routes' => array(
					
			'test-module' => array(
					
					'type'    => 'Literal',
					'options' => array(
							'route'    => '/test-module',
							'defaults' => array(
									'__NAMESPACE__' => 'TestModule\Controller',
									'controller'    => 'index',
									'action'        => 'index',
							),
					),
					
					'may_terminate' => true,
					
					'child_routes' => array(
							'go' => array(
									'type'    => 'Segment',
									'options' => array(
											'route'    => '[/:controller[/:action[/:page]]][/]',
			
											'constraints' => array(
													'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
											),
											
									),
							),
							
					),
			),
		),
	),
	
		
    'view_manager' => array(
        'template_path_stack' => array(
            'TestModule' => __DIR__ . '/../view',
        ),
    ),

	'view_helpers' => array(
			'factories' => array(
					'request_helper' => function($sm){
						$helper = new \TestModule\View\Helper\RequestHelper;
						$request = $sm->getServiceLocator()->get('Request');
						$helper->setRequest($request);
						return $helper;
					},
					'test_helper' => function($sm) {
		    			$helper = new \TestModule\View\Helper\TestHelper();
		    			return $helper;
		    		},
			)
	),
		
	'asset_manager' => array(
			'resolver_configs' => array(
					'paths' => array(
							__DIR__ . '/../public',
					),
			),
	),
		
);
